package zhibi.cms.extra.base;

import org.springframework.web.multipart.MultipartFile;
import zhibi.frame.springmvc.base.AbstractController;
import zhibi.utils.io.FileUtils;

public class AdminBaseController extends AbstractController {

    protected String saveFile(MultipartFile file, String site) {
        return FileUtils.saveFile(file, getFilePath(), site);
    }


    protected String getFilePath() {
        //return "E:\\cloud\\projects\\private\\image-manage\\src\\main\\resources\\data\\";
        return request.getServletContext().getRealPath("/WEB-INF/classes/data") + "/";
    }
}
